<script setup lang="ts">
import {useEducation} from "../../hooks/useEducation.ts";
import {onMounted} from "vue";

const {account} = defineProps<{
  account: string
}>()

const {userEducationInformation, getUserEdu} = useEducation()
onMounted(() => getUserEdu(account))
</script>

<template>
  <div class="content-main-box">
    <el-form :model="userEducationInformation" label-width="120px">
      <el-form-item label="学校名称:">
        <el-input :disabled="userEducationInformation.schoolDisable"
                  v-model="userEducationInformation.school"
                  placeholder="学校名称" clearable/>
      </el-form-item>
      <el-form-item label="专业:">
        <el-input :disabled="userEducationInformation.specialtyDisable"
                  v-model="userEducationInformation.specialty"
                  placeholder="专业" clearable/>
      </el-form-item>
      <el-form-item label="入学时间:">
        <el-date-picker :disabled="userEducationInformation.TimeDisable"
                        v-model="userEducationInformation.studyTimeStart"
                        type="date"
                        placeholder="Pick a date"
                        clearable
        />
        -
        <el-date-picker :disabled="userEducationInformation.TimeDisable"
                        v-model="userEducationInformation.studyTimeEnd"
                        type="date"
                        placeholder="Pick a date"
                        clearable
        />
      </el-form-item>
      <el-form-item label="学历:">
        <el-select :disabled="userEducationInformation.eduBackDisable"
                   v-model="userEducationInformation.eduBackground"
                   placeholder="学历">
          <el-option label="初中" value="初中"/>
          <el-option label="高中" value="高中"/>
          <el-option label="中技" value="中技"/>
          <el-option label="中专" value="中专"/>
          <el-option label="大专" value="大专"/>
          <el-option label="本科" value="本科"/>
          <el-option label="研究生" value="研究生"/>
          <el-option label="MBA" value="MBA"/>
          <el-option label="博士" value="博士"/>
          <el-option label="博士后" value="博士后"/>
        </el-select>
      </el-form-item>
    </el-form>
  </div>
</template>

<style scoped lang="scss">
@import "../style/Content";
</style>